package com.ss.whisper2.dao;

import com.ss.whisper2.pojo.entity.course.Course;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface CourseDao {
	List<Course> getAllCourses();

	List<Integer> getCourseIdByUserName(@Param("username") String username);

	Course getCourseById(@Param("id") Integer id);

	int selectCourse(@Param("username") String username, @Param("courseId") Integer courseId);

	int getSelectCourseResult(@Param("username") String username, @Param("courseId") Integer courseId);

	int getCourseRest(@Param("courseId") Integer courseId);

	int decrCourse(@Param("courseId") Integer courseId, @Param("version")int version);

	int getVersion(@Param("courseId") Integer courseId);

	List<Integer> getScoreList(@Param("username") String username);

	List<Integer> getBehaveScoreList(@Param("username") String username);

	List<Integer> getLastScoreList(@Param("username") String username);

	List<Integer> getExperimentScoreList(@Param("username") String username);
}
